package com.ruanyun.modular.admin.controller;

import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.ruanyun.base.pojo.page.LayuiPageInfo;
import com.ruanyun.modular.admin.entity.VocsEmission;
import com.ruanyun.modular.admin.model.params.VocsEmissionParam;
import com.ruanyun.modular.admin.service.VocsEmissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/emissionSummary")
public class TEmissionSummaryController extends BaseController {
    @Autowired
    private VocsEmissionService emissionService;

    private String PREFIX = "/emissionSummary";

    /**
     * 跳转到主页面
     *
     * @author
     * @Date 2021-04-17
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "/emissionSummary.html";
    }


    /**
     * 查询列表
     *
     * @author
     * @Date 2021-04-28
     */
    @ResponseBody
    @RequestMapping("/list")
    public LayuiPageInfo list(VocsEmissionParam param) {
        return this.emissionService.getEmissionSummary(param);
    }

    /*查询合计*/
    @ResponseBody
    @RequestMapping("totalSummary")
    public ResponseData emissionSummary(VocsEmissionParam param){
        return this.emissionService.totalSummary(param);
    }



}
